<?php
/*  Project lonely
 *  Author: Fvcity dev Team
 *  File: /lonely/archive.php
 *
 *  Subversion Keywords:
 *  $Id: archive.php 19 2007-07-05 05:21:52Z fvcity.roy $
 *  $Date: 2007-07-05 05:21:52 +0000 (Thu, 05 Jul 2007) $
 *  $Revision: 19 $
 *  $Author: fvcity.roy $
 *  $URL: http://fvcity.googlecode.com/svn/trunk/archive.php $
 */
?>
<?php get_header(); ?>

<!-- side sc start -->
<div class="sc">

<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle">下面是归档到&#8216;<?php echo single_cat_title(); ?>&#8217;分类文章</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle">下面是归档到&#8216;<?php the_time('Y年m月d日'); ?>&#8217;分类文章</h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle">下面是归档到&#8216;<?php the_time('Y年m月'); ?>&#8217;分类文章</h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle">下面是归档到&#8216;<?php the_time('Y年'); ?>&#8217;分类文章</h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle">Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Blog Archives</h2>
<?php } ?>

<?php while (have_posts()) : the_post(); ?>

 <div class="postdate">
 <div class="month"><?php the_time('M'); ?></div>
 <div class="day"><?php the_time('d'); ?></div>
 </div>
 	 
 <div class="posthead"><h1><a href="#"></a><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>
  <p class="postinfo"><span class="postauthor"> <?php the_author() ?></span> &nbsp;&nbsp;<span class="postcategory"> <?php the_category(', ') ?></span> &nbsp;&nbsp;<?php if( $wp_version =="2.3-alpha" ||$wp_version >="2.3" ) { ?><?php the_tags('<span class="tag_content">Tags:</span>', ', ', ''); ?><?php } else { ?><?php if ( (function_exists('UTW_ShowTagsForCurrentPost')) ) { ?><?php UTW_ShowTagsForCurrentPost("commalist") ?><?php }?><?php }?> &nbsp;&nbsp;<?php edit_post_link('<span class="edit_post">Edit', ''); ?></span></p>
</div>
  
<div class="postcontent">

<? if (is_home() && (!$paged || $paged == 1) || is_search() || is_single() || is_page()): ?>
<?php the_content('<p class="psot_more">阅读全文... &raquo;</p>'); ?>
<? else: ?><?php the_excerpt() ?><? endif; ?>
 </div>
 
<ul class="postcom">
 <li><?php comments_popup_link('<strong>0</strong> Comments', '<strong>1</strong> Comment', '<strong>%</strong> Comments'); ?></li>
</ul>

<?php endwhile; ?>

		<div class="navigation">
			<?php if(function_exists('fvcity_pagenavi')) { fvcity_pagenavi(); } ?>
		</div>

<?php else : ?>

<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>

<?php endif; ?>
	
</div><!--  side sc end -->
	
<?php get_sidebar(); ?>
<?php get_footer(); ?>
